package com.homework.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.homework.content.BaseContext;
import com.homework.entity.StudentAssignment;
import com.homework.pojo.Result;
import com.homework.service.StudentAssignmentService;
import com.homework.mapper.StudentAssignmentMapper;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【student_assignment】的数据库操作Service实现
* @createDate 2025-05-21 16:33:38
*/
@Service
public class StudentAssignmentServiceImpl extends ServiceImpl<StudentAssignmentMapper, StudentAssignment>
    implements StudentAssignmentService{

    @Override
    public Result homework() {
        Long userId = BaseContext.getCurrentId();
        return Result.success(baseMapper.homework(userId));
    }

    @Override
    public Result myStudentAssignments(Long userId, Integer assignmentId) {
        return Result.success(baseMapper.myStudentAssignments(userId, assignmentId));
    }
}




